function* gen() {
  yield 1; // next一次 done: false
  yield 2;
  yield 3; //
}

const g = gen();

g.next()
g.next()
g.next()

console.log(g.next()); // value: 3,  done: true

